Move app code to a different file