Many bugfixes

EPUB3 valid now.