Plug security holes - Fixes #10 Fixes #11 Fixes #14