Max num of trains is now rounded down.
Fixed two index-1-errors in code examples in the tutorials