Refactored KindleGen/KindleUnpack handling