Fixed many merge bugs, improved CParams class
Minor modification for Texture class