JS improvements