Better encoding of implementation classes.

They are now encoded truly as repositories of static methods.
Before they were encoded as if they were modules, aka top-level
objects.