resource types rewritten

resource types now use factory built on generics declared in a static property (no more boilerplate code in resource types)
resource instances are also being declared as static properties with corresponding names in resource types