Added in Emergency stop & fixed input bugs