struct cleanup
fix compile warning
clean up and comments