Some more application structure refactoring