nit: might want to consider statics to represent these since it seems they are used in multiple places.

(well, not real static since that concept doesn't exist in js but you know what I mean)