Added some comments to my code to make it easier to understand. Also added a new class called Sprite