[Azoth] Refactored stuff into ResourcesManager.