Attachment and movement refactoring