Adding the B-tree is a huge step will require a lot of changes. In order to understand the changes we will split the implementation into steps.
First let us understand B-Trees