TRUNK:2119 Fixed the hardcoding, if/else,try/catch, and bracket issues