Reviewed-by: Karl Palsson <karlp@tweak.net.au> Modified to provide better doxygen and consistent api names.