Compile fixing

Fixed bugs to factory code to at least get code to compile. Test now
compiles and displays database defaults.

TODO: Finish factory initialization.