Feature/epub module refactoring

Hi,

This pull request contains the current progress on epub module refactoring.

It should merge cleanly onto develop.