Made the appending jquery code easier to read