minor fixes, removed debug statements, and fixed a call to a non existant function