Merge "Move simple functions to on device lib." into jb-mr2-dev