Changed so much stuff and I'm too lazy to split it up into multiple
commits