Converting project to Javascript