added support for custom animations, minor fixes