Add allowances, fix minor bugs.