Closes #15 and #16