cleaned up some debugging and error messages