Properly set up `exports` for classes
Support inserting references