Pull request for issues #15, #16, #17