Separated host code from device code as much as possible
added consts to certain kernel wrappers