Refactoring based on advice from @Strand and @razokkull

Removed commented code/notes. Refactored methods into smaller
components. Eliminated uncalled methods.