Refactored code

Support for multistate resources: clone and master. Correct renaming and deleting of them.
Add location resource

Realization is incomplete. commited just for safety in github