Refactoring and improving tests in elevator problem