removes debugger and corrects some bugs