Refactor content preparation