Closes #37, closes #52