Implemented a sound system. Code cleanup.