instead of extending Page extend SiteTree
class MainHomePage extends SiteTree {
}
class MainHomePage_Controller extends ContentController {
}
that should work. If the only reason you want to do this is to have custom CSS on your homepage, you can still extend Page and have different CSS for MainHomePage.
instead of putting your MainHomePage.ss template in /templates/layout, put MainHomePage.ss in your /templates folder and then use <% require themedCSS() %> to include the css files you want.
Another way to include CSS is through the use of Requirements in your init() function
class MainHomePage_Controller extends Page_Controller {
public function init() {
parent::init();
Requirements::CSS('themes/'. SSViewer::current_theme() .'/css/file.css');
}
}