Fixed a load of bugs from the first test