added the $MAINPAGE variable and changed the example page