Reset animation function switch case

Improved animation functions so that it's a switch case instead of else
statement