some more framework refactoring