big refactor; add more apps