move contact details view functions to service and implement avatar image loading