Refactoring util.

Change-Id: I9c26d821c8ebc9c959c966de3b347fc16413895c
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>