moved configuration from dom into javascript; rewrote spec accordingly