Whitespace cleanup
Added header passing to mocks
Extended tests
Added headers logging
Documentation update