Standardize callback, cleanup code.