Split into JS/Py functions for testing. Add to identifiers in compile-structs.

Also includes a couple of small fixes found while writing some initial tests.
Simple start to tests for equality.