Add program parser
Refactoring