Whoops, looks like that last console log commit was made to the wrong local file
Finally added proper console loggin.
Rearranged code and commented for easier readability later