A few security updates 

I've addressed some of the potential security issues.