review code, fix some simple things