Rewrote all tests and fixed stuff