Tidy up code and minor UI changes to profile index page.