Encapsulated the Flux Library removing all global variables, only introd...

...ucing the global function flux.