Did some refactoring
More refactoring