Finished with changes to main page functionality