Refactor animation classes