added some unit tests and fixed up the new parsing changes