removed dependency on Class.extend and used jQuery.extend instead. Also clean up unused white spaces