PLF-5729: Refine the code in the commons project