Fixed some bugs and stuff. A few miscellaneous things.