clean return codes and Data struture usages