Updated line adjustment code and added to motor lib