Use ResourceHelpers to replace DDS hacks scattered throughout the code, fix prefix comparision