Added some not-yet-functional snippets for audio playback. Plus some refactoring.