very rough draft of Foundation/Collection template - and added regtest for it