;
            reader.addControl(stencil);
            styleManager.reader = reader;
            Monocle.Browser.env.supportsTransform3d = false;  // Fix for paging backwards
            Messaging.sendMessage("Ready");
        }
    );
    Messaging.registerHandler("NavigateChapter", function (src) {
        reader.skipToChapter(src);
    });
    Messaging.registerHandler("GotoLocus", function(locus) {
        reader.moveTo(locus);
    });
    Messaging.registerHandler("Styles", styleManager.updateStyles);
 