This closes #35 and closes #38