Made ResourceManager handle different types of files.