change interfaces, fix some code style
fix all code style errors detected by cpplint