The modelhandler currently contains a bunch of utility functions helping with the model. For that variables are needed that are deeply connected to the model itself, like the datascalers, input dimensions, postprocessing of the prediction etc. Refactor the datahandler (into a class) in a way that it holds all data that would be relevant to a user of the model and maybe even the model itself. Then make sure all the data is saved alongside the model itself either by serializing it or by pickeling the whole modelhandler instance. The goal is that it should be possible to use the model without having to know everything about the configuration of the previous step. Everything that is fixed already should be provided.