Refactoring and code style
Refactor and code style. Removed ugly constriction in _stop method.