Split out config, fixed bugs, docs, cleanup