Added controller.rb file to orchestrate actions. refactored some parser code