Issue 26 migrate to foundation 4

This is really a fix for #39.