Separated JavaScript methods