clean  up using directive
minor doc tweak
split schema writing code out into its own file
reformat with clang-format Chromium style