Fixed constructor

Train object is now created when the constructor is called, instead of
in the variable definition.