fixed security issues and updated for compatibility with spud 0.4.x