Added extract function to func module
Refactored printf into Printer io class plus tests
Refactored KPointsWriter to use Printer