performance improvements

move scripts to end of html, combine duplicate contacts, change some ids
to classes