Closes #696, #478, #703.