Refactor drop code.