Refactor EditFragment and speed up loading