Creation of classes and activeresource