Feature/security

Added firewall, fixed several minor bugs