Fixes based on Alex Millar's feedback.