Rewrite to use codegeneration
Add atom IO for dates, some other things
Make reading atoms provide better error feedback