added stripslashes at more points in code, deleted debug printouts and started extensive documentation