[Lib/Tests/Docs] Added ability to specify function name; fixed bugs; added tests; updated docs.