move sprite management into its own class