Some fixes for reported issues and a couple more manual merges.