Refactor layout and stub edit page