Added accept-encoding header + some fixes