Refactored ResourceManager

Error messages are yet to be added