Refactored everything

This is what happens when I don't have any pressing work.