Simplified animation code and added a flush

Signed-off-by: retep998 <retep998@verizon.net>
Merge