Improved the tuple module