Added: Functions for main app