Minor fixes to address most glaring bugs