Fix class/module name collisions

The Rails code reloader used in development can't cope with modules and classes with the same name in different parts of the module namespace. You get plenty of "found class, expected module" style whinging, followed by restarting of the server. This fixes some of it, but I'm sure there's more…