cleaned up merge conflicts and bugs