Fixing merge conflicts and adding documentation