Working towards sharing code between trainers.
The code in all of the trainers are very similar, but cannot be shared verbatim at the moment. So as a first step I try to created unified code for the datastore. This commit is only a first step in this direction.
Also I started to split the Repository in smaller parts to make it more readable.