Initial version, using namedtuples of the side-topics code

Just the initalisation code at the moment, and a broken training method.