refactor test apps