added sound and logging
added sounds, refactored event code
updated switch code
fixed merge conflict