restructured resource classes to a tree, moved functionalities, removed redundancies