Getting closer to working animation code