Moving stuff around, added some more debug info