cleaned up statepoint writing routines
changed reading statepoint routines