Restored various local changes
Fixing messed up merge