move away again from MAT files for constants
make direction indices 1-based
stop using indices for directions