Added Part 2, page functions and write_fixed_len_pages - not properly tested version