Pendulum testcases
Fixes #40 (among other commits)