Fixes and improvements found and suggested by QA