Improved enemy code