Moved Library functions to separate module