Fixed a few issues with tests with duplicated names. Some tidy up also.