Closes #9 and #8