encryption works now. cleanup of loggings.