Reimplement working with connection profiles (#172)