Refactoring of old boting