Various small fixes by CurlyMoo