TODOs resolved: documentation added.