Mass refactor with history loosing