use Page instead of WikiPage on JSPs whenever possible
diff --git a/jspwiki-war/src/main/webapp/Comment.jsp b/jspwiki-war/src/main/webapp/Comment.jsp
index 7cfc58b..b9b6d03 100644
--- a/jspwiki-war/src/main/webapp/Comment.jsp
+++ b/jspwiki-war/src/main/webapp/Comment.jsp
@@ -24,18 +24,21 @@
 <%@ page import="org.apache.wiki.*" %>
 <%@ page import="org.apache.wiki.api.core.*" %>
 <%@ page import="org.apache.wiki.api.exceptions.RedirectException" %>
+<%@ page import="org.apache.wiki.auth.AuthorizationManager" %>
+<%@ page import="org.apache.wiki.auth.login.CookieAssertionLoginModule" %>
 <%@ page import="org.apache.wiki.filters.SpamFilter" %>
 <%@ page import="org.apache.wiki.htmltowiki.HtmlStringToWikiTranslator" %>
-<%@ page import="org.apache.wiki.ui.EditorManager" %>
-<%@ page import="org.apache.wiki.util.HttpUtil" %>
-<%@ page import="org.apache.wiki.util.TextUtil" %>
 <%@ page import="org.apache.wiki.pages.PageLock" %>
+<%@ page import="org.apache.wiki.pages.PageManager" %>
 <%@ page import="org.apache.wiki.preferences.Preferences" %>
-<%@ page import="org.apache.wiki.auth.login.CookieAssertionLoginModule" %>
-<%@ page import="org.apache.wiki.workflow.DecisionRequiredException" %>
 <%@ page import="org.apache.wiki.preferences.Preferences" %>
 <%@ page import="org.apache.wiki.preferences.Preferences.TimeFormat" %>
+<%@ page import="org.apache.wiki.ui.EditorManager" %>
+<%@ page import="org.apache.wiki.ui.TemplateManager" %>
+<%@ page import="org.apache.wiki.util.HttpUtil" %>
+<%@ page import="org.apache.wiki.util.TextUtil" %>
 <%@ page import="org.apache.wiki.variables.VariableManager" %>
+<%@ page import="org.apache.wiki.workflow.DecisionRequiredException" %>
 <%@ page errorPage="/Error.jsp" %>
 <%@ page import="javax.servlet.http.Cookie" %>
 <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
@@ -58,10 +61,10 @@
 %>
 
 <%
-    WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
+    Engine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context and check for authorization
     WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.COMMENT );
-    if( !wiki.getAuthorizationManager().hasAccess( wikiContext, response ) ) return;
+    if( !wiki.getManager( AuthorizationManager.class ).hasAccess( wikiContext, response ) ) return;
     if( wikiContext.getCommand().getTarget() == null ) {
         response.sendRedirect( wikiContext.getURL( wikiContext.getRequestContext(), wikiContext.getName() ) );
         return;
@@ -84,8 +87,8 @@
     String remember = TextUtil.replaceEntities( request.getParameter("remember") );
     String changenote = TextUtil.replaceEntities( request.getParameter( "changenote" ) );
 
-    WikiPage wikipage = wikiContext.getPage();
-    WikiPage latestversion = wiki.getPageManager().getPage( pagereq );
+    Page wikipage = wikiContext.getPage();
+    Page latestversion = wiki.getManager( PageManager.class ).getPage( pagereq );
 
     session.removeAttribute( EditorManager.REQ_EDITEDTEXT );
 
@@ -141,7 +144,7 @@
 
         //  Modifications are written here before actual saving
 
-        WikiPage modifiedPage = (WikiPage)wikiContext.getPage().clone();
+        Page modifiedPage = (Page)wikiContext.getPage().clone();
 
         //  FIXME: I am not entirely sure if the JSP page is the
         //  best place to check for concurrent changes.  It certainly
@@ -156,8 +159,8 @@
         //
         //  We expire ALL locks at this moment, simply because someone has already broken it.
         //
-        PageLock lock = wiki.getPageManager().getCurrentLock( wikipage );
-        wiki.getPageManager().unlockPage( lock );
+        PageLock lock = wiki.getManager( PageManager.class ).getCurrentLock( wikipage );
+        wiki.getManager( PageManager.class ).unlockPage( lock );
         session.removeAttribute( "lock-"+pagereq );
 
         //
@@ -166,15 +169,15 @@
         modifiedPage.setAuthor( storedUser );
 
         if( changenote != null ) {
-            modifiedPage.setAttribute( WikiPage.CHANGENOTE, changenote );
+            modifiedPage.setAttribute( Page.CHANGENOTE, changenote );
         } else {
-            modifiedPage.removeAttribute( WikiPage.CHANGENOTE );
+            modifiedPage.removeAttribute( Page.CHANGENOTE );
         }
 
         //
         //  Build comment part
         //
-        StringBuffer pageText = new StringBuffer(wiki.getPageManager().getPureText( wikipage ));
+        StringBuffer pageText = new StringBuffer( wiki.getManager( PageManager.class ).getPureText( wikipage ));
 
         log.debug("Page initial contents are "+pageText.length()+" chars");
 
@@ -229,7 +232,7 @@
 
         try {
             wikiContext.setPage( modifiedPage );
-            wiki.getPageManager().saveText( wikiContext, pageText.toString() );
+            wiki.getManager( PageManager.class ).saveText( wikiContext, pageText.toString() );
         } catch( DecisionRequiredException e ) {
         	String redirect = wikiContext.getURL(WikiContext.VIEW,"ApprovalRequiredForPageChanges");
             response.sendRedirect( redirect );
@@ -251,7 +254,7 @@
         PageLock lock = (PageLock) session.getAttribute( "lock-"+pagereq );
 
         if( lock != null ) {
-            wiki.getPageManager().unlockPage( lock );
+            wiki.getManager( PageManager.class ).unlockPage( lock );
             session.removeAttribute( "lock-"+pagereq );
         }
         response.sendRedirect( wikiContext.getViewURL(pagereq) );
@@ -277,7 +280,7 @@
     //
     //  Attempt to lock the page.
     //
-    PageLock lock = wiki.getPageManager().lockPage( wikipage, storedUser );
+    PageLock lock = wiki.getManager( PageManager.class ).lockPage( wikipage, storedUser );
 
     if( lock != null ) {
         session.setAttribute( "lock-"+pagereq, lock );
@@ -288,6 +291,6 @@
     response.setHeader( "Cache-control", "max-age=0" );
     response.setDateHeader( "Expires", new Date().getTime() );
     response.setDateHeader( "Last-Modified", new Date().getTime() );
-    String contentPage = wiki.getTemplateManager().findJSP( pageContext, wikiContext.getTemplate(), "EditTemplate.jsp" );
+    String contentPage = wiki.getManager( TemplateManager.class ).findJSP( pageContext, wikiContext.getTemplate(), "EditTemplate.jsp" );
 
 %><wiki:Include page="<%=contentPage%>" />
diff --git a/jspwiki-war/src/main/webapp/Delete.jsp b/jspwiki-war/src/main/webapp/Delete.jsp
index ebb1e04..f459da0 100644
--- a/jspwiki-war/src/main/webapp/Delete.jsp
+++ b/jspwiki-war/src/main/webapp/Delete.jsp
@@ -48,8 +48,8 @@
     }
     String pagereq = wikiContext.getName();
 
-    WikiPage wikipage      = wikiContext.getPage();
-    WikiPage latestversion = wiki.getManager( PageManager.class ).getPage( pagereq );
+    Page wikipage      = wikiContext.getPage();
+    Page latestversion = wiki.getManager( PageManager.class ).getPage( pagereq );
 
     String delete = request.getParameter( "delete" );
     String deleteall = request.getParameter( "delete-all" );
@@ -65,8 +65,7 @@
         redirTo = ((Attachment)wikipage).getParentName();
     }
 
-    if( deleteall != null )
-    {
+    if( deleteall != null ) {
         log.info("Deleting page "+pagereq+". User="+request.getRemoteUser()+", host="+HttpUtil.getRemoteAddress(request) );
 
         wiki.getManager( PageManager.class ).deletePage( pagereq );
@@ -80,20 +79,16 @@
 
         response.sendRedirect( TextUtil.replaceString( wiki.getURL( WikiContext.VIEW, redirTo, "tab="+request.getParameter("tab") ),"&amp;","&" ));
         return;
-    }
-    else if( delete != null )
-    {
+    } else if( delete != null ) {
         log.info("Deleting a range of pages from "+pagereq);
 
-        for( Enumeration< String > params = request.getParameterNames(); params.hasMoreElements(); )
-        {
+        for( Enumeration< String > params = request.getParameterNames(); params.hasMoreElements(); ) {
             String paramName = params.nextElement();
 
-            if( paramName.startsWith("delver") )
-            {
+            if( paramName.startsWith("delver") ) {
                 int version = Integer.parseInt( paramName.substring(7) );
 
-                WikiPage p = wiki.getManager( PageManager.class ).getPage( pagereq, version );
+                Page p = wiki.getManager( PageManager.class ).getPage( pagereq, version );
 
                 log.debug("Deleting version "+version);
                 wiki.getManager( PageManager.class ).deleteVersion( p );
@@ -104,7 +99,6 @@
             TextUtil.replaceString( wiki.getURL( WikiContext.VIEW, redirTo, "tab=" + request.getParameter( "tab" ) ),"&amp;","&" )
         );
 
-
         return;
     }
 
diff --git a/jspwiki-war/src/main/webapp/Edit.jsp b/jspwiki-war/src/main/webapp/Edit.jsp
index a885d22..d1a0fc3 100644
--- a/jspwiki-war/src/main/webapp/Edit.jsp
+++ b/jspwiki-war/src/main/webapp/Edit.jsp
@@ -90,8 +90,8 @@
         text = new HtmlStringToWikiTranslator().translate(htmlText,wikiContext);
     }
 
-    WikiPage wikipage = wikiContext.getPage();
-    WikiPage latestversion = wiki.getManager( PageManager.class ).getPage( pagereq );
+    Page wikipage = wikiContext.getPage();
+    Page latestversion = wiki.getManager( PageManager.class ).getPage( pagereq );
 
     if( latestversion == null ) {
         latestversion = wikiContext.getPage();
@@ -121,7 +121,7 @@
             return;
         }
 
-        WikiPage modifiedPage = (WikiPage)wikiContext.getPage().clone();
+        Page modifiedPage = (Page)wikiContext.getPage().clone();
 
         //  FIXME: I am not entirely sure if the JSP page is the
         //  best place to check for concurrent changes.  It certainly
@@ -160,9 +160,9 @@
         session.removeAttribute("changenote");
 
         if( changenote != null && changenote.length() > 0 ) {
-            modifiedPage.setAttribute( WikiPage.CHANGENOTE, changenote );
+            modifiedPage.setAttribute( Page.CHANGENOTE, changenote );
         } else {
-            modifiedPage.removeAttribute( WikiPage.CHANGENOTE );
+            modifiedPage.removeAttribute( Page.CHANGENOTE );
         }
 
         //
diff --git a/jspwiki-war/src/main/webapp/Search.jsp b/jspwiki-war/src/main/webapp/Search.jsp
index 2286d79..5048498 100644
--- a/jspwiki-war/src/main/webapp/Search.jsp
+++ b/jspwiki-war/src/main/webapp/Search.jsp
@@ -21,10 +21,11 @@
 <%@ page import="org.apache.log4j.*" %>
 <%@ page import="org.apache.wiki.*" %>
 <%@ page import="org.apache.wiki.api.core.*" %>
+<%@ page import="org.apache.wiki.api.search.*" %>
 <%@ page import="org.apache.wiki.auth.*" %>
 <%@ page import="org.apache.wiki.auth.permissions.*" %>
 <%@ page import="org.apache.wiki.preferences.Preferences" %>
-<%@ page import="org.apache.wiki.search.*" %>
+<%@ page import="org.apache.wiki.search.SearchManager" %>
 <%@ page import="org.apache.wiki.ui.TemplateManager" %>
 <%@ page import="org.apache.wiki.util.TextUtil" %>
 <%@ page errorPage="/Error.jsp" %>
@@ -58,25 +59,17 @@
 
         query = TextUtil.replaceEntities( query );
 
-        pageContext.setAttribute( "query",
-                                  query,
-                                  PageContext.REQUEST_SCOPE );
+        pageContext.setAttribute( "query", query, PageContext.REQUEST_SCOPE );
 
         //
         //  Did the user click on "go"?
         //
-        if( go != null )
-        {
-            if( list != null && list.size() > 0 )
-            {
+        if( go != null ) {
+            if( list != null && list.size() > 0 ) {
                 SearchResult sr = list.iterator().next();
-
-                WikiPage wikiPage = sr.getPage();
-
+                Page wikiPage = sr.getPage();
                 String url = wikiContext.getViewURL( wikiPage.getName() );
-
                 response.sendRedirect( url );
-
                 return;
             }
         }
diff --git a/jspwiki-war/src/main/webapp/rss.jsp b/jspwiki-war/src/main/webapp/rss.jsp
index e38d3d9..5b55c25 100644
--- a/jspwiki-war/src/main/webapp/rss.jsp
+++ b/jspwiki-war/src/main/webapp/rss.jsp
@@ -55,7 +55,7 @@
     // Create wiki context and check for authorization
     WikiContext wikiContext = new WikiContext( wiki, request, "rss" );
     if(!wiki.getManager( AuthorizationManager.class ).hasAccess( wikiContext, response ) ) return;
-    WikiPage wikipage = wikiContext.getPage();
+    Page wikipage = wikiContext.getPage();
 
     // Redirect if RSS generation not on
     if( wiki.getManager( RSSGenerator.class ) == null ) {
@@ -94,7 +94,7 @@
     //
     //  Now, list items.
     //
-    List< WikiPage > changed;
+    List< Page > changed;
     
     if( "blog".equals( mode ) ) {
         WeblogPlugin plug = new WeblogPlugin();
@@ -109,8 +109,8 @@
     boolean hasChanged = false;
     Date    latest     = new Date(0);
 
-    for( Iterator< WikiPage > i = changed.iterator(); i.hasNext(); ) {
-        WikiPage p = i.next();
+    for( Iterator< Page > i = changed.iterator(); i.hasNext(); ) {
+        Page p = i.next();
 
         if( !HttpUtil.checkFor304( request, p.getName(), p.getLastModified() ) ) hasChanged = true;
         if( p.getLastModified().after( latest ) ) latest = p.getLastModified();
diff --git a/jspwiki-war/src/main/webapp/templates/210/InfoContent.jsp b/jspwiki-war/src/main/webapp/templates/210/InfoContent.jsp
index c59d32b..6f91642 100644
--- a/jspwiki-war/src/main/webapp/templates/210/InfoContent.jsp
+++ b/jspwiki-war/src/main/webapp/templates/210/InfoContent.jsp
@@ -21,9 +21,10 @@
 <%@ page import="java.security.Permission" %>
 <%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
 <%@ page import="org.apache.wiki.*" %>
+<%@ page import="org.apache.wiki.api.core.*" %>
+<%@ page import="org.apache.wiki.attachment.AttachmentManager" %>
 <%@ page import="org.apache.wiki.auth.*" %>
 <%@ page import="org.apache.wiki.auth.permissions.*" %>
-<%@ page import="org.apache.wiki.attachment.*" %>
 <%@ page import="org.apache.wiki.i18n.InternationalizationManager" %>
 <%@ page import="org.apache.wiki.pages.PageManager" %>
 <%@ page import="org.apache.wiki.preferences.Preferences" %>
@@ -34,8 +35,8 @@
 <fmt:setLocale value="${prefs.Language}" />
 <fmt:setBundle basename="templates.default"/>
 <%
-  WikiContext c = WikiContext.findContext(pageContext);
-  WikiPage wikiPage = c.getPage();
+  Context c = WikiContext.findContext(pageContext);
+  Page wikiPage = c.getPage();
   int attCount = c.getEngine().getManager( AttachmentManager.class ).listAttachments( c.getPage() ).size();
   String attTitle = LocaleSupport.getLocalizedMessage(pageContext, "attach.tab");
   if( attCount != 0 ) attTitle += " (" + attCount + ")";
@@ -46,7 +47,7 @@
   String creationAuthor ="";
 
   //FIXME -- seems not to work correctly for attachments !!
-  WikiPage firstPage = c.getEngine().getManager( PageManager.class ).getPage( wikiPage.getName(), 1 );
+  Page firstPage = c.getEngine().getManager( PageManager.class ).getPage( wikiPage.getName(), 1 );
   if( firstPage != null )
   {
     creationAuthor = firstPage.getAuthor();
@@ -244,7 +245,7 @@
         </td>
 
          <td class="changenote">
-           <% String changenote = (String) currentPage.getAttribute( WikiPage.CHANGENOTE );  %>
+           <% String changenote = (String) currentPage.getAttribute( Page.CHANGENOTE );  %>
 		   <%= (changenote==null) ? "" : changenote  %>
          </td>
 
@@ -396,7 +397,7 @@
       </wiki:Permission>
       --%>
       <td class='changenote'>
-        <% String changenote = (String) att.getAttribute( WikiPage.CHANGENOTE ); %>
+        <% String changenote = (String) att.getAttribute( Page.CHANGENOTE ); %>
 		<%= (changenote==null) ? "" : changenote  %>
       </td>
     </tr>
diff --git a/jspwiki-war/src/main/webapp/templates/210/editors/CKeditor.jsp b/jspwiki-war/src/main/webapp/templates/210/editors/CKeditor.jsp
index cf85ee8..d0d8265 100644
--- a/jspwiki-war/src/main/webapp/templates/210/editors/CKeditor.jsp
+++ b/jspwiki-war/src/main/webapp/templates/210/editors/CKeditor.jsp
@@ -26,7 +26,7 @@
 <%@ page import="org.apache.wiki.auth.permissions.*" %>
 <%@ page import="org.apache.wiki.filters.*" %>
 <%@ page import="org.apache.wiki.pages.PageManager" %>
-<%@ page import="org.apache.wiki.parser.JSPWikiMarkupParser" %>
+<%@ page import="org.apache.wiki.parser.MarkupParser" %>
 <%@ page import="org.apache.wiki.render.*" %>
 <%@ page import="org.apache.wiki.ui.*" %>
 <%@ page import="org.apache.wiki.util.TextUtil" %>
@@ -40,7 +40,7 @@
     This provides the WYSIWYG CKeditor for JSPWiki.
 --%>
 <%
-    WikiContext context = WikiContext.findContext( pageContext );
+    Context context = WikiContext.findContext( pageContext );
     Engine engine = context.getEngine();
 
     /* local download of CKeditor */
@@ -52,12 +52,12 @@
            "//cdn.ckeditor.com/4.5.1/standard/ckeditor.js" );
     */
 
-    context.setVariable( WikiContext.VAR_WYSIWYG_EDITOR_MODE, Boolean.TRUE );
+    context.setVariable( Context.VAR_WYSIWYG_EDITOR_MODE, Boolean.TRUE );
     context.setVariable( VariableManager.VAR_RUNFILTERS,  "false" );
 
-    WikiPage wikiPage = context.getPage();
-    String originalCCLOption = (String)wikiPage.getAttribute( JSPWikiMarkupParser.PROP_CAMELCASELINKS );
-    wikiPage.setAttribute( JSPWikiMarkupParser.PROP_CAMELCASELINKS, "false" );
+    Page wikiPage = context.getPage();
+    String originalCCLOption = (String)wikiPage.getAttribute( MarkupParser.PROP_CAMELCASELINKS );
+    wikiPage.setAttribute( MarkupParser.PROP_CAMELCASELINKS, "false" );
 
     String usertext = EditorManager.getEditedText(pageContext);
 
@@ -68,7 +68,7 @@
   String clone = request.getParameter( "clone" );
   if( clone != null )
   {
-    WikiPage p = engine.getManager( PageManager.class ).getPage( clone );
+    Page p = engine.getManager( PageManager.class ).getPage( clone );
     if( p != null )
     {
         AuthorizationManager mgr = engine.getManager( AuthorizationManager.class );
@@ -113,14 +113,13 @@
    context.setVariable( WikiContext.VAR_WYSIWYG_EDITOR_MODE, Boolean.FALSE );
 
    context.setVariable( VariableManager.VAR_RUNFILTERS,  null );
-   wikiPage.setAttribute( JSPWikiMarkupParser.PROP_CAMELCASELINKS, originalCCLOption );
+   wikiPage.setAttribute( MarkupParser.PROP_CAMELCASELINKS, originalCCLOption );
 
    /*not used
    String templateDir = (String)copyOfWikiProperties.get( Engine.PROP_TEMPLATEDIR );
 
    String protocol = "http://";
-   if( request.isSecure() )
-   {
+   if( request.isSecure() ) {
        protocol = "https://";
    }
    */
diff --git a/jspwiki-war/src/main/webapp/templates/210/editors/FCK.jsp b/jspwiki-war/src/main/webapp/templates/210/editors/FCK.jsp
index c6662b2..0a103ff 100644
--- a/jspwiki-war/src/main/webapp/templates/210/editors/FCK.jsp
+++ b/jspwiki-war/src/main/webapp/templates/210/editors/FCK.jsp
@@ -27,7 +27,7 @@
 <%@ page import="org.apache.wiki.auth.permissions.*" %>
 <%@ page import="org.apache.wiki.filters.*" %>
 <%@ page import="org.apache.wiki.pages.PageManager" %>
-<%@ page import="org.apache.wiki.parser.JSPWikiMarkupParser" %>
+<%@ page import="org.apache.wiki.parser.MarkupParser" %>
 <%@ page import="org.apache.wiki.render.*" %>
 <%@ page import="org.apache.wiki.ui.*" %>
 <%@ page import="org.apache.wiki.util.TextUtil" %>
@@ -39,14 +39,14 @@
 <%--
     This provides the FCK editor for JSPWiki.
 --%>
-<%  WikiContext context = WikiContext.findContext( pageContext );
+<%  Context context = WikiContext.findContext( pageContext );
     Engine engine = context.getEngine();
-    context.setVariable( WikiContext.VAR_WYSIWYG_EDITOR_MODE, Boolean.TRUE );
+    context.setVariable( Context.VAR_WYSIWYG_EDITOR_MODE, Boolean.TRUE );
     context.setVariable( VariableManager.VAR_RUNFILTERS,  "false" );
 
-    WikiPage wikiPage = context.getPage();
-    String originalCCLOption = (String)wikiPage.getAttribute( JSPWikiMarkupParser.PROP_CAMELCASELINKS );
-    wikiPage.setAttribute( JSPWikiMarkupParser.PROP_CAMELCASELINKS, "false" );
+    Page wikiPage = context.getPage();
+    String originalCCLOption = (String)wikiPage.getAttribute( MarkupParser.PROP_CAMELCASELINKS );
+    wikiPage.setAttribute( MarkupParser.PROP_CAMELCASELINKS, "false" );
 
     String usertext = EditorManager.getEditedText(pageContext);
     TemplateManager.addResourceRequest( context, TemplateManager.RESOURCE_SCRIPT,
@@ -58,7 +58,7 @@
   String clone = request.getParameter( "clone" );
   if( clone != null )
   {
-    WikiPage p = engine.getManager( PageManager.class ).getPage( clone );
+    Page p = engine.getManager( PageManager.class ).getPage( clone );
     if( p != null )
     {
         AuthorizationManager mgr = engine.getManager( AuthorizationManager.class );
@@ -88,15 +88,14 @@
 
    // Disable the WYSIWYG_EDITOR_MODE and reset the other properties immediately
    // after the XHTML for FCK has been rendered.
-   context.setVariable( WikiContext.VAR_WYSIWYG_EDITOR_MODE, Boolean.FALSE );
+   context.setVariable( Context.VAR_WYSIWYG_EDITOR_MODE, Boolean.FALSE );
    context.setVariable( VariableManager.VAR_RUNFILTERS,  null );
-   wikiPage.setAttribute( JSPWikiMarkupParser.PROP_CAMELCASELINKS, originalCCLOption );
+   wikiPage.setAttribute( MarkupParser.PROP_CAMELCASELINKS, originalCCLOption );
 
    String templateDir = (String)engine.getWikiProperties().get( Engine.PROP_TEMPLATEDIR );
 
    String protocol = "http://";
-   if( request.isSecure() )
-   {
+   if( request.isSecure() ) {
        protocol = "https://";
    }
 %>
diff --git a/jspwiki-war/src/main/webapp/templates/210/editors/TinyMCE.jsp b/jspwiki-war/src/main/webapp/templates/210/editors/TinyMCE.jsp
index 52047d2..55088d0 100644
--- a/jspwiki-war/src/main/webapp/templates/210/editors/TinyMCE.jsp
+++ b/jspwiki-war/src/main/webapp/templates/210/editors/TinyMCE.jsp
@@ -26,7 +26,7 @@
 <%@ page import="org.apache.wiki.auth.permissions.*" %>
 <%@ page import="org.apache.wiki.filters.*" %>
 <%@ page import="org.apache.wiki.pages.PageManager" %>
-<%@ page import="org.apache.wiki.parser.JSPWikiMarkupParser" %>
+<%@ page import="org.apache.wiki.parser.MarkupParser" %>
 <%@ page import="org.apache.wiki.render.*" %>
 <%@ page import="org.apache.wiki.ui.*" %>
 <%@ page import="org.apache.wiki.util.TextUtil" %>
@@ -39,7 +39,7 @@
     This provides the WYSIWYG TinyMCE for JSPWiki.
 --%>
 <%
-    WikiContext context = WikiContext.findContext( pageContext );
+    Context context = WikiContext.findContext( pageContext );
     Engine engine = context.getEngine();
 
     /* local download of TinyMCE */
@@ -51,12 +51,12 @@
            "//tinymce.cachefly.net/4.2/tinymce.min.js" );
     */
 
-    context.setVariable( WikiContext.VAR_WYSIWYG_EDITOR_MODE, Boolean.TRUE );
+    context.setVariable( Context.VAR_WYSIWYG_EDITOR_MODE, Boolean.TRUE );
     context.setVariable( VariableManager.VAR_RUNFILTERS,  "false" );
 
-    WikiPage wikiPage = context.getPage();
-    String originalCCLOption = (String)wikiPage.getAttribute( JSPWikiMarkupParser.PROP_CAMELCASELINKS );
-    wikiPage.setAttribute( JSPWikiMarkupParser.PROP_CAMELCASELINKS, "false" );
+    Page wikiPage = context.getPage();
+    String originalCCLOption = (String)wikiPage.getAttribute( MarkupParser.PROP_CAMELCASELINKS );
+    wikiPage.setAttribute( MarkupParser.PROP_CAMELCASELINKS, "false" );
 
     String usertext = EditorManager.getEditedText(pageContext);
 
@@ -67,7 +67,7 @@
   String clone = request.getParameter( "clone" );
   if( clone != null )
   {
-    WikiPage p = engine.getManager( PageManager.class ).getPage( clone );
+    Page p = engine.getManager( PageManager.class ).getPage( clone );
     if( p != null )
     {
         AuthorizationManager mgr = engine.getManager( AuthorizationManager.class );
@@ -106,9 +106,9 @@
 
    // Disable the WYSIWYG_EDITOR_MODE and reset the other properties immediately
    // after the XHTML for TinyMCE has been rendered.
-   context.setVariable( WikiContext.VAR_WYSIWYG_EDITOR_MODE, Boolean.FALSE );
+   context.setVariable( Context.VAR_WYSIWYG_EDITOR_MODE, Boolean.FALSE );
    context.setVariable( VariableManager.VAR_RUNFILTERS,  null );
-   wikiPage.setAttribute( JSPWikiMarkupParser.PROP_CAMELCASELINKS, originalCCLOption );
+   wikiPage.setAttribute( MarkupParser.PROP_CAMELCASELINKS, originalCCLOption );
 
    /*not used
    String templateDir = (String)engine.getWikiProperties().get( Engine.PROP_TEMPLATEDIR );
diff --git a/jspwiki-war/src/main/webapp/templates/210/editors/plain.jsp b/jspwiki-war/src/main/webapp/templates/210/editors/plain.jsp
index e4743f7..9fa858c 100644
--- a/jspwiki-war/src/main/webapp/templates/210/editors/plain.jsp
+++ b/jspwiki-war/src/main/webapp/templates/210/editors/plain.jsp
@@ -36,7 +36,7 @@
         This is a plain editor for JSPWiki.
 --%>
 <%
-   WikiContext context = WikiContext.findContext( pageContext );
+   Context context = WikiContext.findContext( pageContext );
    Engine engine = context.getEngine();
 
    TemplateManager.addResourceRequest( context, TemplateManager.RESOURCE_SCRIPT,
@@ -50,7 +50,7 @@
   String clone = request.getParameter( "clone" );
   if( clone != null )
   {
-    WikiPage p = engine.getManager( PageManager.class ).getPage( clone );
+    Page p = engine.getManager( PageManager.class ).getPage( clone );
     if( p != null )
     {
         AuthorizationManager mgr = engine.getManager( AuthorizationManager.class );
diff --git a/jspwiki-war/src/main/webapp/templates/210/editors/preview.jsp b/jspwiki-war/src/main/webapp/templates/210/editors/preview.jsp
index 90057f5..b687efb 100644
--- a/jspwiki-war/src/main/webapp/templates/210/editors/preview.jsp
+++ b/jspwiki-war/src/main/webapp/templates/210/editors/preview.jsp
@@ -20,6 +20,7 @@
 <%@ page language="java" pageEncoding="UTF-8"%>
 <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
 <%@ page import="org.apache.wiki.*" %>
+<%@ page import="org.apache.wiki.api.core.*" %>
 <%@ page import="org.apache.wiki.ui.*" %>
 <%@ page import="org.apache.wiki.util.TextUtil" %>
 <%@ page import="org.apache.wiki.filters.*" %>
@@ -31,7 +32,7 @@
         This is a special editor component for JSPWiki preview storage.
 --%>
 <%
-   WikiContext context = WikiContext.findContext( pageContext );
+   Context context = WikiContext.findContext( pageContext );
    String usertext = (String)pageContext.getAttribute( EditorManager.ATTR_EDITEDTEXT, PageContext.REQUEST_SCOPE );
    if( usertext == null ) usertext = "";
 
diff --git a/jspwiki-war/src/main/webapp/templates/210/editors/wysiwyg.jsp b/jspwiki-war/src/main/webapp/templates/210/editors/wysiwyg.jsp
index 31991ce..f853733 100644
--- a/jspwiki-war/src/main/webapp/templates/210/editors/wysiwyg.jsp
+++ b/jspwiki-war/src/main/webapp/templates/210/editors/wysiwyg.jsp
@@ -36,7 +36,7 @@
         This is a plain editor for JSPWiki.
 --%>
 <%
-   WikiContext context = WikiContext.findContext( pageContext );
+   Context context = WikiContext.findContext( pageContext );
    Engine engine = context.getEngine();
 
    TemplateManager.addResourceRequest( context, TemplateManager.RESOURCE_SCRIPT,
@@ -50,7 +50,7 @@
   String clone = request.getParameter( "clone" );
   if( clone != null )
   {
-    WikiPage p = engine.getManager( PageManager.class ).getPage( clone );
+    Page p = engine.getManager( PageManager.class ).getPage( clone );
     if( p != null )
     {
         AuthorizationManager mgr = engine.getManager( AuthorizationManager.class );
diff --git a/jspwiki-war/src/main/webapp/templates/default/AJAXSearch.jsp b/jspwiki-war/src/main/webapp/templates/default/AJAXSearch.jsp
index 8a1c672..f750bf6 100644
--- a/jspwiki-war/src/main/webapp/templates/default/AJAXSearch.jsp
+++ b/jspwiki-war/src/main/webapp/templates/default/AJAXSearch.jsp
@@ -19,17 +19,19 @@
 
 <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
 <%@ page language="java" pageEncoding="UTF-8"%>
+<%@ page import="java.util.*" %>
+<%@ page import="java.util.Collection" %>
+<%@ page import="java.net.URLEncoder" %>
+<%@ page import="org.apache.commons.lang3.*" %>
 <%@ page import="org.apache.log4j.*" %>
 <%@ page import="org.apache.wiki.*" %>
+<%@ page import="org.apache.wiki.api.core.*" %>
+<%@ page import="org.apache.wiki.api.search.SearchResult" %>
 <%@ page import="org.apache.wiki.auth.*" %>
 <%@ page import="org.apache.wiki.auth.permissions.*" %>
 <%@ page import="org.apache.wiki.preferences.Preferences" %>
-<%@ page import="org.apache.wiki.search.SearchResult" %>
+<%@ page import="org.apache.wiki.search.SearchManager" %>
 <%@ page import="org.apache.wiki.ui.*" %>
-<%@ page import="java.util.*" %>
-<%@ page import="java.util.Collection" %>
-<%@ page import="org.apache.commons.lang3.*" %>
-<%@ page import="java.net.URLEncoder" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
 <%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
@@ -41,14 +43,14 @@
     wiki = WikiEngine.getInstance( getServletConfig() );
   }
   Logger log = Logger.getLogger("JSPWikiSearch");
-  WikiEngine wiki;
+  Engine wiki;
 %>
 <%
   /* ********************* actual start ********************* */
   /* FIXME: too much hackin on this level -- should better happen in toplevel jsp's */
   /* Create wiki context and check for authorization */
   WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.FIND );
-  if(!wiki.getAuthorizationManager().hasAccess( wikiContext, response )) return;
+  if(!wiki.getManager( AuthorizationManager.class ).hasAccess( wikiContext, response ) ) return;
 
   String query = request.getParameter( "query");
 
@@ -56,21 +58,18 @@
   {
     try
     {
-      Collection< SearchResult > list = wiki.getSearchManager().findPages( query, wikiContext );
+      Collection< SearchResult > list = wiki.getManager( SearchManager.class ).findPages( query, wikiContext );
 
       //  Filter down to only those that we actually have a permission to view
-      AuthorizationManager mgr = wiki.getAuthorizationManager();
+      AuthorizationManager mgr = wiki.getManager( AuthorizationManager.class );
 
-      //ArrayList< SearchResult > items = new ArrayList<>();
-      //"The '<>' Diamond operator is not allowed for source level below 1.7"
-      //The compiler that eg. tomcat is running is older than 1.7. -- need mod to tomcat/conf/web.xml
-      ArrayList< SearchResult > items = new ArrayList< SearchResult >();
+      ArrayList< SearchResult > items = new ArrayList<>();
 
       for( Iterator< SearchResult > i = list.iterator(); i.hasNext(); )
       {
         SearchResult r = i.next();
 
-        WikiPage p = r.getPage();
+        Page p = r.getPage();
 
         PagePermission pp = new PagePermission( p, PagePermission.VIEW_ACTION );
 
diff --git a/jspwiki-war/src/main/webapp/templates/default/InfoContent.jsp b/jspwiki-war/src/main/webapp/templates/default/InfoContent.jsp
index d9a5bef..94b54d5 100644
--- a/jspwiki-war/src/main/webapp/templates/default/InfoContent.jsp
+++ b/jspwiki-war/src/main/webapp/templates/default/InfoContent.jsp
@@ -18,6 +18,7 @@
 --%>
 
 <%@ page import="org.apache.wiki.*" %>
+<%@ page import="org.apache.wiki.api.core.*" %>
 <%@ page import="org.apache.wiki.auth.*" %>
 <%@ page import="org.apache.wiki.auth.permissions.*" %>
 <%@ page import="org.apache.wiki.attachment.*" %>
@@ -35,8 +36,8 @@
 <fmt:setLocale value="${prefs.Language}" />
 <fmt:setBundle basename="templates.default"/>
 <%
-  WikiContext c = WikiContext.findContext(pageContext);
-  WikiPage wikiPage = c.getPage();
+  Context c = WikiContext.findContext(pageContext);
+  Page wikiPage = c.getPage();
   int attCount = c.getEngine().getManager( AttachmentManager.class ).listAttachments( c.getPage() ).size();
   String attTitle = LocaleSupport.getLocalizedMessage(pageContext, "attach.tab");
   if( attCount != 0 ) attTitle += " (" + attCount + ")";
@@ -44,7 +45,7 @@
   String creationAuthor ="";
 
   //FIXME -- seems not to work correctly for attachments !!
-  WikiPage firstPage = c.getEngine().getManager( PageManager.class ).getPage( wikiPage.getName(), 1 );
+  Page firstPage = c.getEngine().getManager( PageManager.class ).getPage( wikiPage.getName(), 1 );
   if( firstPage != null )
   {
     creationAuthor = firstPage.getAuthor();
@@ -203,7 +204,7 @@
           </wiki:CheckVersion>
         </td>
 
-        <c:set var="changenote" value="<%= (String)currentPage.getAttribute( WikiPage.CHANGENOTE ) %>" />
+        <c:set var="changenote" value="<%= (String)currentPage.getAttribute( Page.CHANGENOTE ) %>" />
         <td class="changenote"><c:out value="${changenote}"/></td>
 
       </tr>
@@ -370,7 +371,7 @@
       </wiki:Permission>
       --%>
 
-      <c:set var="changenote" value="<%= (String)att.getAttribute( WikiPage.CHANGENOTE ) %>" />
+      <c:set var="changenote" value="<%= (String)att.getAttribute( Page.CHANGENOTE ) %>" />
         <td class="changenote"><c:out value="${changenote}"/></td>
 
     </tr>
diff --git a/jspwiki-war/src/main/webapp/templates/default/editors/CKeditor.jsp b/jspwiki-war/src/main/webapp/templates/default/editors/CKeditor.jsp
index bc229c6..60ba62b 100644
--- a/jspwiki-war/src/main/webapp/templates/default/editors/CKeditor.jsp
+++ b/jspwiki-war/src/main/webapp/templates/default/editors/CKeditor.jsp
@@ -25,7 +25,7 @@
 <%@ page import="org.apache.wiki.auth.permissions.*" %>
 <%@ page import="org.apache.wiki.filters.*" %>
 <%@ page import="org.apache.wiki.pages.PageManager" %>
-<%@ page import="org.apache.wiki.parser.JSPWikiMarkupParser" %>
+<%@ page import="org.apache.wiki.parser.MarkupParser" %>
 <%@ page import="org.apache.wiki.render.*" %>
 <%@ page import="org.apache.wiki.ui.*" %>
 <%@ page import="org.apache.wiki.util.TextUtil" %>
@@ -40,7 +40,7 @@
     This provides the WYSIWYG CKeditor for JSPWiki.
 --%>
 <%
-    WikiContext context = WikiContext.findContext( pageContext );
+    Context context = WikiContext.findContext( pageContext );
     Engine engine = context.getEngine();
 
     /* local download of CKeditor */
@@ -52,12 +52,12 @@
            "//cdn.ckeditor.com/4.5.1/standard/ckeditor.js" );
     */
 
-    context.setVariable( WikiContext.VAR_WYSIWYG_EDITOR_MODE, Boolean.TRUE );
+    context.setVariable( Context.VAR_WYSIWYG_EDITOR_MODE, Boolean.TRUE );
     context.setVariable( VariableManager.VAR_RUNFILTERS,  "false" );
 
-    WikiPage wikiPage = context.getPage();
-    String originalCCLOption = (String)wikiPage.getAttribute( JSPWikiMarkupParser.PROP_CAMELCASELINKS );
-    wikiPage.setAttribute( JSPWikiMarkupParser.PROP_CAMELCASELINKS, "false" );
+    Page wikiPage = context.getPage();
+    String originalCCLOption = (String)wikiPage.getAttribute( MarkupParser.PROP_CAMELCASELINKS );
+    wikiPage.setAttribute( MarkupParser.PROP_CAMELCASELINKS, "false" );
 
     String usertext = EditorManager.getEditedText(pageContext);
 
@@ -69,7 +69,7 @@
   String clone = request.getParameter( "clone" );
   if( clone != null )
   {
-    WikiPage p = engine.getManager( PageManager.class ).getPage( clone );
+    Page p = engine.getManager( PageManager.class ).getPage( clone );
     if( p != null )
     {
         AuthorizationManager mgr = engine.getManager( AuthorizationManager.class );
@@ -115,16 +115,15 @@
 
    // Disable the WYSIWYG_EDITOR_MODE and reset the other properties immediately
    // after the XHTML for CKeditor has been rendered.
-   context.setVariable( WikiContext.VAR_WYSIWYG_EDITOR_MODE, Boolean.FALSE );
+   context.setVariable( Context.VAR_WYSIWYG_EDITOR_MODE, Boolean.FALSE );
    context.setVariable( VariableManager.VAR_RUNFILTERS,  null );
-   wikiPage.setAttribute( JSPWikiMarkupParser.PROP_CAMELCASELINKS, originalCCLOption );
+   wikiPage.setAttribute( MarkupParser.PROP_CAMELCASELINKS, originalCCLOption );
 
    /*FFS not used
    String templateDir = (String)copyOfWikiProperties.get( Engine.PROP_TEMPLATEDIR );
 
    String protocol = "http://";
-   if( request.isSecure() )
-   {
+   if( request.isSecure() ) {
        protocol = "https://";
    }
    */
@@ -211,8 +210,8 @@
       </ul>
     </div>
 
-    <c:set var="editors" value="<%= engine.getManager( EditorManager.class ).getEditorList() %>" />
-    <c:if test='${fn:length(editors)>1}'>
+  <c:set var="editors" value="<%= engine.getManager( EditorManager.class ).getEditorList() %>" />
+  <c:if test='${fn:length(editors)>1}'>
    <div class="btn-group config">
       <%-- note: 'dropdown-toggle' is only here to style the last button properly! --%>
       <button class="btn btn-default dropdown-toggle"><span class="icon-pencil"></span><span class="caret"></span></button>
@@ -231,8 +230,7 @@
       </c:forEach>
       </ul>
     </div>
-    </c:if>
-
+   </c:if>
   </div>
 
 
diff --git a/jspwiki-war/src/main/webapp/templates/default/editors/TinyMCE.jsp b/jspwiki-war/src/main/webapp/templates/default/editors/TinyMCE.jsp
index 515fba0..ef036a4 100644
--- a/jspwiki-war/src/main/webapp/templates/default/editors/TinyMCE.jsp
+++ b/jspwiki-war/src/main/webapp/templates/default/editors/TinyMCE.jsp
@@ -26,7 +26,7 @@
 <%@ page import="org.apache.wiki.auth.permissions.*" %>
 <%@ page import="org.apache.wiki.filters.*" %>
 <%@ page import="org.apache.wiki.pages.PageManager" %>
-<%@ page import="org.apache.wiki.parser.JSPWikiMarkupParser" %>
+<%@ page import="org.apache.wiki.parser.MarkupParser" %>
 <%@ page import="org.apache.wiki.render.*" %>
 <%@ page import="org.apache.wiki.ui.*" %>
 <%@ page import="org.apache.wiki.util.TextUtil" %>
@@ -46,15 +46,15 @@
     This provides the WYSIWYG TinyMCE for JSPWiki.
 --%>
 <%
-    WikiContext context = WikiContext.findContext( pageContext );
+    Context context = WikiContext.findContext( pageContext );
     Engine engine = context.getEngine();
 
-    context.setVariable( WikiContext.VAR_WYSIWYG_EDITOR_MODE, Boolean.TRUE );
+    context.setVariable( Context.VAR_WYSIWYG_EDITOR_MODE, Boolean.TRUE );
     context.setVariable( VariableManager.VAR_RUNFILTERS,  "false" );
 
-    WikiPage wikiPage = context.getPage();
-    String originalCCLOption = (String)wikiPage.getAttribute( JSPWikiMarkupParser.PROP_CAMELCASELINKS );
-    wikiPage.setAttribute( JSPWikiMarkupParser.PROP_CAMELCASELINKS, "false" );
+    Page wikiPage = context.getPage();
+    String originalCCLOption = (String)wikiPage.getAttribute( MarkupParser.PROP_CAMELCASELINKS );
+    wikiPage.setAttribute( MarkupParser.PROP_CAMELCASELINKS, "false" );
 
     String usertext = EditorManager.getEditedText(pageContext);
 
@@ -67,7 +67,7 @@
   String clone = request.getParameter( "clone" );
   if( clone != null )
   {
-    WikiPage p = engine.getManager( PageManager.class ).getPage( clone );
+    Page p = engine.getManager( PageManager.class ).getPage( clone );
     if( p != null )
     {
         AuthorizationManager mgr = engine.getManager( AuthorizationManager.class );
@@ -116,9 +116,9 @@
 
    // Disable the WYSIWYG_EDITOR_MODE and reset the other properties immediately
    // after the XHTML for TinyMCE has been rendered.
-   context.setVariable( WikiContext.VAR_WYSIWYG_EDITOR_MODE, Boolean.FALSE );
+   context.setVariable( Context.VAR_WYSIWYG_EDITOR_MODE, Boolean.FALSE );
    context.setVariable( VariableManager.VAR_RUNFILTERS,  null );
-   wikiPage.setAttribute( JSPWikiMarkupParser.PROP_CAMELCASELINKS, originalCCLOption );
+   wikiPage.setAttribute( MarkupParser.PROP_CAMELCASELINKS, originalCCLOption );
 
    /*FSS not used
    String templateDir = (String)engine.getWikiProperties().get( Engine.PROP_TEMPLATEDIR );
@@ -186,28 +186,26 @@
     </div>
 
   <div class="btn-group editor-tools">
-
     <div class="btn-group config">
       <%-- note: 'dropdown-toggle' is only here to style the last button properly! --%>
       <button class="btn btn-default dropdown-toggle"><span class="icon-wrench"></span><span class="caret"></span></button>
       <ul class="dropdown-menu" data-hover-parent="div">
-            <li>
-              <a>
-                <label for="livepreview">
-                  <input type="checkbox" data-cmd="livepreview" id="livepreview" ${prefs.livepreview ? 'checked="checked"' : ''}/>
-                  <fmt:message key='editor.plain.livepreview'/> <span class="icon-refresh"/>
-                </label>
-              </a>
-            </li>
-            <li>
-              <a>
-                <label for="previewcolumn">
-                  <input type="checkbox" data-cmd="previewcolumn" id="previewcolumn" ${prefs.previewcolumn ? 'checked="checked"' : ''}/>
-                  <fmt:message key='editor.plain.sidebysidepreview'/> <span class="icon-columns"/>
-                </label>
-              </a>
-            </li>
-
+         <li>
+           <a>
+             <label for="livepreview">
+               <input type="checkbox" data-cmd="livepreview" id="livepreview" ${prefs.livepreview ? 'checked="checked"' : ''}/>
+               <fmt:message key='editor.plain.livepreview'/> <span class="icon-refresh"/>
+             </label>
+           </a>
+         </li>
+         <li>
+           <a>
+             <label for="previewcolumn">
+               <input type="checkbox" data-cmd="previewcolumn" id="previewcolumn" ${prefs.previewcolumn ? 'checked="checked"' : ''}/>
+               <fmt:message key='editor.plain.sidebysidepreview'/> <span class="icon-columns"/>
+             </label>
+           </a>
+         </li>
       </ul>
     </div>
 
diff --git a/jspwiki-war/src/main/webapp/templates/default/editors/plain.jsp b/jspwiki-war/src/main/webapp/templates/default/editors/plain.jsp
index 88d54fb..8ec27a1 100644
--- a/jspwiki-war/src/main/webapp/templates/default/editors/plain.jsp
+++ b/jspwiki-war/src/main/webapp/templates/default/editors/plain.jsp
@@ -37,7 +37,7 @@
         This is a plain editor for JSPWiki.
 --%>
 <%
-   WikiContext context = WikiContext.findContext( pageContext );
+   Context context = WikiContext.findContext( pageContext );
    Engine engine = context.getEngine();
 
    String usertext = EditorManager.getEditedText( pageContext );
@@ -50,7 +50,7 @@
   String clone = request.getParameter( "clone" );
   if( clone != null )
   {
-    WikiPage p = engine.getManager( PageManager.class ).getPage( clone );
+    Page p = engine.getManager( PageManager.class ).getPage( clone );
     if( p != null )
     {
         AuthorizationManager mgr = engine.getManager( AuthorizationManager.class );
diff --git a/jspwiki-war/src/main/webapp/templates/default/editors/preview.jsp b/jspwiki-war/src/main/webapp/templates/default/editors/preview.jsp
index 02d0b37..01838f5 100644
--- a/jspwiki-war/src/main/webapp/templates/default/editors/preview.jsp
+++ b/jspwiki-war/src/main/webapp/templates/default/editors/preview.jsp
@@ -20,6 +20,7 @@
 <%@ page language="java" pageEncoding="UTF-8"%>
 <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
 <%@ page import="org.apache.wiki.*" %>
+<%@ page import="org.apache.wiki.api.core.*" %>
 <%@ page import="org.apache.wiki.ui.*" %>
 <%@ page import="org.apache.wiki.util.TextUtil" %>
 <%@ page import="org.apache.wiki.filters.*" %>
@@ -31,7 +32,7 @@
         This is a special editor component for JSPWiki preview storage.
 --%>
 <%
-   WikiContext context = WikiContext.findContext( pageContext );
+   Context context = WikiContext.findContext( pageContext );
    String usertext = (String)pageContext.getAttribute( EditorManager.ATTR_EDITEDTEXT, PageContext.REQUEST_SCOPE );
    if( usertext == null ) usertext = "";
 
diff --git a/jspwiki-war/src/main/webapp/templates/default/editors/wysiwyg.jsp b/jspwiki-war/src/main/webapp/templates/default/editors/wysiwyg.jsp
index 2a556ce..e39b458 100644
--- a/jspwiki-war/src/main/webapp/templates/default/editors/wysiwyg.jsp
+++ b/jspwiki-war/src/main/webapp/templates/default/editors/wysiwyg.jsp
@@ -26,7 +26,7 @@
 <%@ page import="org.apache.wiki.auth.permissions.*" %>
 <%@ page import="org.apache.wiki.filters.*" %>
 <%@ page import="org.apache.wiki.pages.PageManager" %>
-<%@ page import="org.apache.wiki.parser.JSPWikiMarkupParser" %>
+<%@ page import="org.apache.wiki.parser.MarkupParser" %>
 <%@ page import="org.apache.wiki.render.*" %>
 <%@ page import="org.apache.wiki.ui.*" %>
 <%@ page import="org.apache.wiki.util.TextUtil" %>
@@ -42,15 +42,15 @@
     This provides a wysiwy editor for JSPWiki. (based on mooeditable)
 --%>
 <%
-    WikiContext context = WikiContext.findContext( pageContext );
+    Context context = WikiContext.findContext( pageContext );
     Engine engine = context.getEngine();
 
-    context.setVariable( WikiContext.VAR_WYSIWYG_EDITOR_MODE, Boolean.TRUE );
+    context.setVariable( Context.VAR_WYSIWYG_EDITOR_MODE, Boolean.TRUE );
     context.setVariable( VariableManager.VAR_RUNFILTERS,  "false" );
 
-    WikiPage wikiPage = context.getPage();
-    String originalCCLOption = (String)wikiPage.getAttribute( JSPWikiMarkupParser.PROP_CAMELCASELINKS );
-    wikiPage.setAttribute( JSPWikiMarkupParser.PROP_CAMELCASELINKS, "false" );
+    Page wikiPage = context.getPage();
+    String originalCCLOption = (String)wikiPage.getAttribute( MarkupParser.PROP_CAMELCASELINKS );
+    wikiPage.setAttribute( MarkupParser.PROP_CAMELCASELINKS, "false" );
 
     String usertext = EditorManager.getEditedText(pageContext);
 %>
@@ -61,7 +61,7 @@
   String clone = request.getParameter( "clone" );
   if( clone != null )
   {
-    WikiPage p = engine.getManager( PageManager.class ).getPage( clone );
+    Page p = engine.getManager( PageManager.class ).getPage( clone );
     if( p != null )
     {
         AuthorizationManager mgr = engine.getManager( AuthorizationManager.class );
@@ -107,15 +107,14 @@
 
    // Disable the WYSIWYG_EDITOR_MODE and reset the other properties immediately
    // after the XHTML for wysiwyg editor has been rendered.
-   context.setVariable( WikiContext.VAR_WYSIWYG_EDITOR_MODE, Boolean.FALSE );
+   context.setVariable( Context.VAR_WYSIWYG_EDITOR_MODE, Boolean.FALSE );
    context.setVariable( VariableManager.VAR_RUNFILTERS,  null );
-   wikiPage.setAttribute( JSPWikiMarkupParser.PROP_CAMELCASELINKS, originalCCLOption );
+   wikiPage.setAttribute( MarkupParser.PROP_CAMELCASELINKS, originalCCLOption );
 
    /*not used
    String templateDir = (String)engine.getWikiProperties().get( Engine.PROP_TEMPLATEDIR );
    String protocol = "http://";
-   if( request.isSecure() )
-   {
+   if( request.isSecure() ) {
        protocol = "https://";
    }
    */