Bugs fixed and some printfs removed