Added sound and serial toggle buttons and cleaned up code