Remove unnecessary code to another module