Moved root collection to lib/resource.js, replaced objectResource and arrayResource with improved nativeResource