Condensed Javascript a bit, fixed tooltip initialization