Added stop-method and removed unnecessary code