Fixed a bunch of stupid mistakes