Refactoring to accomodate ePubGenerator