Improved a bunch of things, halfway functional