Code to populate the views