Enhanced and cleaned up tests