Add major code.

Model implemented. So far, schedules can be generated, but not sorted
nor stats generated. No server-client architecture yet.