Finished and ready.

See header file for function description.