CDAP-506: code improvements