Refactor enemy logic.