More function return cleanup, and refactor of debugging, and massive cleanup of debug levels, + debug logging