Refactoring: "js/ct.js".

change to OOP style.