fix b+ tree implementation. other minor changes