Minor bug fixes, added a few config features.