Refactored driver tests and fixed small issues