Tidy up the API a little and doc the parameters.
Merge pull request #2 from Cadair/drew_aiaprep

Drew aiaprep