Improve the quality of the code after removing std from part of library after which we should be able to merge the branch into master.