Another fix + removed console logs
Added tests, based on abergs tests