Refactored the index view