Refactoring

Still need to add a DiC so that the variable classes can be injected
correctly.