Fixed a load of stuff

Everything works, but the configuration is a bit finicky.