Replaced custom collect() function with jQuery's extend()

No need to reinvent the wheel!