Add tests and support for blacklisting IPs