Add comments and fix the slider to update the frequency