Refactoring in progress...

Non-functional code at the moment.  Broke it all out into files and working on turning each file into a useful class.