Tests: Speed up and fixes