Moved code for li-updates

This is a preparatory change for a later change on smarter updates when several users are editing at the same time.