cleaned up some parsing stuff
Fixes some small problems Brest pointed out