Fixes for dev/documents

This pull request fixes issue #5, issue #15 and issue #16