Animations now take render delay into account.
Lots of changes, more debugging probably needed.