Changes for issue #41 and #42.
Updated API docs.