css transitions and more efficient dom handling