Code cleanup

- Added documentation strings to functions, replacing the comments above
  their definitions.
- Removed the AIF macro as it was only used once.
- Removed the STRCAT function and replaced its 2 uses with simple FORMAT
  calls.