security code cleanup