clean up, more debugging and update man page