Fixed undefined object class error: allows using pure JS objects without a class