Corrected some bug fixes and added more debugging functions