Refactor log4cf