Refactor Update #1

Did a major refactor to separate out the component creation of the
application and pulled out a lot of magic numbers and general rough
code. Finally decided to slow things down and get the code closer to
production code, while still sloppy in places.