Logic for training is in. Now the mundane task of implementation.