Moving application control into a module