Removed unused variable and tweaked amplitude.