added contacts, links field, tests; fixed bugs