Addresses #496, #512, #513, and #514.