Work in progress: rewrite.
Rewrite: selection works
Rewrite: animation works
Rewrite complete.