Added css transitions to smooth out animations