File parsers refactored