added Parser class as a parent of all parsers. Some refactoring