refactored code with collision detection to remove projectiles and aliens from their respective arrays upon contact