Added comments to several parts of the code (mainly train and dcc)

Also fixed some minor quirks