clea up some code