Animation refactor

This PR closes #178 and #228.