moved the code responsible for management of external resources into a seperate method
Merge pull request #15 from mrosiu/seperate-resource-management-method

Moved the code responsible for management of external resources into a seperate method