refactoring parser for easier development, java docs for parser class