Changes made to better handle pause/resume/start/stop training.
General code cleanup. Changed start/stop/pause/resume handles to prevent bug in resuming when has not started etc.