Unit testing: put Catalyst startup code in its own file; added API test template.