Code cleanup

packets updating
removing last bits of logic.
added boolean handling to endReached
most things now have no compile errors