Refactored tonton.js