took out $.extend and replaced with simplecopy.  needs testing