Some code-cleanup/simplification in apps