Fixing Code

Forgot to add some parameters. Also adding section for generating and
storing the training data