Document main controller