Resolved Conflicts that happened during merging with SG's code