Fixed a bug in isamh_pp_read and cleaned up a bit