Tested and refactored some view code