[refs #2653] Refactored the code