Add a Train class and initialize method to file.