Added flipAll() utility function and UnitTests for the same