Grid Animation added. Factored Track_functions away from main