Minor code refactoring
Temporarily disable object registration

This is to workaround #995.