The construction and structure of medieval gates