Optimized the jQuery extend() a bit.