tidied up controllers and views