Added animation. Fixed grid generation bug