Refactored views
Added unit tests for utility functions