Optimized createPowerup function a bit