Added missing timeout parameter
Reworked blpop and brpop
Removed debug output