fix merge conflicts, minor typos and code formatting