Accelerometer Code Reduction and collision sound

1. Accelerometer code reduction.
2. Collision sound implemented.