Closes #4 and #8.