Couple of little things that came up while implementing the JS version.