Some refactoring

Just some refactoring