slight refactoring in takeAttributes; adjust test to work under FF which apparently doesn't support milliseconds in string representations of Date