move edit_alignment implementation details to detail