Refactored settings to support multi-masters
Modified createfiles to change file modes