added merging of duplicate mod configs instead of just using the first one
refactored build script to make updates easier
changed TCConst to Reference
other miscellaneous changes