Added rest of merge from previous commit