Closes #169, #170