Added parser submodule and did some refactoring.