Added nodejs mode and some modifications.