Many aspects of Streamly are written in spaghetti code... Functions should be explicit and should take input rather than reading global variables. More object-oriented functions should be used. This will be the first code cleanup of Streamly!