refactored how apps are created so it's cleaner