Finished projectile code