Move chunks of code to their right location
Add comments
Clean up
Redefine as an autoload function