modularized parser code. updated tests. Started working on parser tests.