Updated Dcoumentation and cleaned up debug