Added documentation; fixed minor implementation issue