add edit page, partials, refactor