Project: global cleanup and refactoring. Add parser and tests.