Add context middleware and formatters