Fixed a shit ton of bugs

All tests are working except 9 and 12.