Fixed a lot of conflicts

Thanks to Pac-Man/CyanKang for some fixes