show edit & some other refactoring