separate classes into files

Bit more code control and modularity, by putting the classes and libraries into separate files.
Also implemented a FIXME/TODO checking that the move happens in the required outer-board segment.