some work on making js magic more uniform and less surprising