Minor refactoring

Code is good now