Switched from binary to tuple and added supporting functions.