Refactor

This is no where near ready to merge, I just wanted an easier way to view the diff.