Fix JS race condition and "1 people use this"

This subsumes #155