refactor kingdom generator

new namespace/library thingy created with kingdom generator
functions/definitions and display values, separated out from generator
code.