Refactored a lot of code.
It to make it easier to add behavior to the framework later on.