Move app testing code out of src/