#230: some refactoring
130: Attempting some refactoring.