Introduced resourceManager

The resourceManager class takes over most resource related functionality
(e.g. storing and loading) that was split across several classes till
now.