Implement more js functions.