Added documentation to all public methods and rewrote the ResourceManager class.