Made a lot of changes to CP and Valve templates