Adding more parsing tests. Some refactoring.