Format structure. Add rules