clean up code in views/