Unit Tests and minor bug fixes

Signed-off-by: PradeepX Chenthati <pradeepx.chenthati@intel.com>