B-Tree implementation in C