Extracted HAL code to its own package

Added links to header for CSV