Seperation of concerns.
Removed dead code.