Implemented some view logic