Refactoring code

:sunglasses: