Define missing classes dynamically during register

Fixes issue #17