code cleanup and whatnot