Static fixes

Add support for HEAD requests and fix+improve the tests.