Function output of prediction

All of the functionality of the process is collected into classes and
functions. Now time to create a API out of this!