Add custom object constructor support, and a bunch of helper tests.