clean up source code, remove useless code