Forgot to add a bunch of stuff. Fixed some other bugs.