clean up useless codes

last 4 commits by Paracel