Added a lot debug()'s might as well do it before the bugs occur... :)
Fixed bugs and added more debug()'s