Added more JS functionality