Refactored to use multiple apps instead of being one single app