lots o' small fixes