Lots of tests and code stuff