Added ability to return another object inside the constructor.
Fixed bug where not providing any data to class(data) would error out.