Cleaned up unit tests and fixed generic parameters