Move debug stuff to debug