Reorder and rename db spec functions.