Random bits of javascript