Going from the top-down

Here's the bit that calls into the value generator
Started implementing the end-point
Corrected a stupid mistake
Can now request distinct values from data for type

With start and stop times if required