Added pin sound
Cleaned up code