updated GenApp and added MainClass for tests