Converted macros to functions.

Also tweaked indentation formatting of other functions.
Fixed import & updated calls.
Fixed more calls.
Use lists instead of tuples.

Addresses issue #5.
Removed the tuple-using code.

This finishes up issue #5.