Beginning of cleanup round and error catching/checking.