Splitted Resource classes into two. Now the Admin script is somehow working (some bugs present, but may depend on model). TODO: optimize the view script (remove duplicate methods).