Removed the use of anonymouse functions from stream.php