Untested

Close #8, fix #15, fix #16.