start refactoring into separate files
Started implementing configuration space discretization, but it bugs
(probably returning an invalid index due to roundoff).