More code refactoring, added projectile class.