remove typecasts
add flush command to buffered queue
Merge pull request #4 from adeven/flush_buffered_queue

Flush buffered queue