TLPI source code reimplementation.