Minor changes for consistency between render system and sound system
Refactored a lot.