Animation added to config. Refactored other code