Refactor enemy.js