Bunch of debugging done