Sound improvement and code cleaning