Core pr 4

Merge with PH libraries and a lot of cache optimization in relation to data from the data-well.