Animation refactor

This PR addresses #178 and #228. Some notes to follow...