Refactor the code to use these new functions. Change-Id: I21ee7e9a96f30fbd60106add5e8b071e86bf93c9 Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>