Fix issues #46 and #50 and improve developer docs