Small world generation changes and MatrixMath refactor

Signed-off-by: Aleksi Sapon <QcTechs@gmail.com>
Merge pull request #516 from Sleaker/master

Solves multiple IndexOutOfBounds issues
Merge pull request #515 from DDoSQc/master

Small world generation changes and MatrixMath refactor
Format issue.

Signed-off-by: Nick Minkler <sleaker@gmail.com>