Fixed all issues from security audit
Merge pull request #185 from mtoma/fix-seucurity-audit-remaining-issues

Fixed all issues from security audit