Refactor and stub in ipsum function