More progress towards #9; small fixes