Set better default for delay
Some sql schema changes
Proper support for delay_until and expires in. Refs #24