Keysounds offset adjustment
Avoid creating short event keysounds
Code formatting and cleanup