clear some code and cancel auto layout