Test collisions. Fix some bugs in spring.js