Improved performance a bit more to avoid the toMap etc