Updated testing

Updated code and updated some of the tests. Removed some of the useless tests.
If this line is not needed it should be removed.