Refactored toplist tree walking to use lambda-like filter