Add edit page to adminmenu and refactor models