Cleanup useless codes