Updated legacy JS