Clean up by moving functions in an object to outside.