test init/remove app + refactor