Added more unit tests and fixed more parser bugs