Optimization and adding animation