Declarative functionality

When we assign to `__class__` none of the new class's attributes get mapped onto the original object. This means the `code` attribute doesn't get carried across. I doubt we'll ever want to introspect `code` again, but just something to keep in mind.