Refactoring

Just some refactoring