Generalizes constructor for TestApp