YAYY. ITS WORKING!
Removed debug code and fixed the things