First sort of working version of animation. Code is ugly :-(