the motte was built on the flattened top of a natural mound , a foothill of the berwyns , and consisted of a three-storey stone structure surrounded by a stout timbered palisade and a steep ditch while the bailey below it , similarly encircled , contained various servile endeavors including a forge , barracks , stables and kitchens .