GUI initial modular divison

Split training window from wxGUI as a whole, so that the code comes in
more manageable chunks.
As part of this, figured out how to deal with the directories in a
hack-ish and inelegant way.