clean some code