random code cleanup