Merged gkbrk's changes, new configuration system, maybe other stuff