Refactored the parser to make it OO. Also added freezing of rails.