Added tuple support for arguments.
Refactored error handling slightly.
Refactored errors so that they are all based on the same type.