Added blink function if USB cable is disconnected, cleaned up code.
Added switch functions for lights and sound.