Closes #8 and closes #38