Implements the changes suggested in #207. Do not accept until a consensus is reached there.