Restructured to remove required knowledge of HPI product structure, and declutter the code. Results of the API now follow the structure of HPI's product line rather than imposing an intermediate data structure that has to be maintained