cleanup up some code / view bugs