Added: more JS implementation (ie Ruby->JS translation)