security, style and misc small updates