Use builder classes to build up data which JS can use.