Code cleanup of the general variety