Apply best practices on stream API usage