JCR-2260 : Re-Factory code