quick tweaks & cleanup

minor security enhancements & code cleanup