Fixed issue with creating new resources
Removed unneeded template
Removed global variable