Examples on collection framework

Policy calculation code refactored