Loading and unloading objects, dynamic registration

Oh dear... how much code did I just write?