Updated and fixed unit tests