Improve god-state compatibility with powerline. Plus cleanup some stuff.