Completed rewrite to not depend on pyyaml for config file.