Query interface improvement and math module removal replaced by libinter
Stream and device tagging improvement