Added lock functinality and ability to read commands from Serial.