Fixing view population bug. Adding unit test for view population.