add tests template directory, plus change the startup routine for more configurability (esp. for testing).