Closes #157. Closes #310. Closes #312.