minor security hardening
code cleanup