merge conflicts fixed and other tweaks