I've done some refactoring.