Refactor parsing code into app_parser file