Closes #1297, #1346, and #1347.