Renamed addressFromHeaders to extractAddressFromHeaders and changed visibility to private. Added documentation for the method as well.