clean up code, remove some irrelevant comments