Stille some debug stuff but mostly working