Fixed a lot of stupid code, added semi-colons, and updated tests