Fixed some merge conflicts and removed a few debug statements