Whitespace tidying.
Use jQuery API instead of string manipulation.