Convert js options to use named args. fixes #1