Reorganize animation init code to save lines and make prettier.