removing unneeded files, redesigning connect js function