Optimise code for non-c++11.
Add readMark feature.