Fixed compile errors.
Fixed merge conflicts.