Refactoring - not donne

Reason : shitty code to begin with