clean up some code issues