Closes #46 and #48.