Fixed more bugs and has preliminary conflict handling.