refactored
unused import removed
hardcoded timeouts removed or replaced (tests with varying behaviour)