Made app more generic for code reuse