refactored very heavily
fixed up all the refactoring issues, improved the parsing/processing a bit