split app and UI widgets into separate js