Start reimplementing tween.c functions