start organizing js tests
reorganize things to remove global defines
fix broken js tests