Prevent double header writing and implement interface copying