resolve some conflicts and clean up