     digitalWrite(dirPin, dir);
     delayMicroseconds(pulseWidth);
     for (int i=0; i<accelSteps; i++) {
-        onestep(map(i, 0, accelSteps, max(maxPulse, startpulse), startpulse));
+        oneStep(map(i, 0, accelSteps, max(maxPulse, startpulse), startpulse));
         if (alarmState) return;
     }
     for (int i=0; i<glisssteps; i++) {
-        onestep(map(i, 0, glisssteps, startpulse, endpulse));
+        oneStep(map(i, 0, glisssteps, startpulse, endpulse));
         if (alarmState) return;
     }
     for (int i=0; i<accelSteps; i++) {
-        onestep(map(i, 0, accelSteps, endpulse, max(maxPulse, endpulse)));
+        oneStep(map(i, 0, accelSteps, endpulse, max(maxPulse, endpulse)));
         if (i>(accelSteps - decelLook) && digitalRead(sensorPin)) break;
         if (alarmState) return;
     }
     findSensor(max(maxPulse, endpulse));
 }
 
-int timedturn(int halfturns, unsigned long duration, bool dir) {
+int timedTurn(int halfturns, unsigned long duration, bool dir) {
     int fullspeedsteps = (halfTurnSteps * halfturns) - (accelSteps * 2);
     unsigned long pulse = ((duration * 1000L) - (maxPulse * accelSteps)) /
                           (accelSteps + fullspeedsteps);
-    int localAccelSteps = accelSteps;
+    int accelsteps = accelSteps;
     if (pulse > maxPulse) {
-        localAccelSteps = 0;
+        accelsteps = 0;
         fullspeedsteps = halfTurnSteps * halfturns;
         pulse = (duration * 1000L) / fullspeedsteps;
     } else {

        Serial.print(" endpitch ");
        Serial.print(endPitch, DEC);
        Serial.print(" direction ");
        Serial.print(dir, DEC);
        Serial.print(" recentre ");
        Serial.print(recentre, DEC);
        Serial.print(" time ");
        unsigned long starttime = millis();
        long calcdur = doublegliss(midDuration, Duration,
                startPitch, midPitch, endPitch,
                sustainDuration, sustainDuration, sustainDuration,
                dir, recentre);
        Serial.print(millis() - starttime);
        Serial.print(" calctime ");
        Serial.println(calcdur, DEC);

            findSensor(maxPulse);
            sendReady();
        } else if (data == rTurn) {
            turn(halfTurns, startPitch, Dir);
        } else if (data == rGliss) {
            gliss(halfTurns, startPitch, endPitch, Dir);
        } else if (data == rTimedTurn) {
            timedTurn(halfTurns, Duration, Dir);
        } else if (data == rDurationTurn) {
            durationTurn(Duration, startPitch, Dir, reCentre);
        } else if (data == rDurationGliss) {
            durationGliss(Duration, startPitch, endPitch,
                    Dir, reCentre, sustainDuration);
        } else if (data == rForwards) {
            Dir = true;
        } else if (data == rBackwards) {
            Dir = false;
        } else if (data == rRecentre) {
            reCentre = true;
        } else if (data == rNoRecentre) {
            reCentre = false;
        } else if (data == rSetDuration) {
            for (byte d=0; d<rDurlength; d++) {
                newDuration[d] = serialIncoming[++i];
