Refactor View code to be more flexible and not all in one class