Removed debugging output files, did some optimization