Renovated training module

Enabled modulization to make it run from outside scripts