Refactored @config to use attr_reader and added build_headers method