Reorganized to handle animations and time scales