Better obj parsing

Improve the parsing of custom objs by adding static initializers that register the unmarshaling of the objects.