various misc fixes and additions