Updated the views to be an object rather than an array