Refactored code to use Star sprite object.