Remove doctest invocation in code, add comment indicating source of algorithm