Correcting code for Linux.

Compiles and runs! Hooray for mostly portable code!
Merge remote-tracking branch 'windows/behaviouralcorrection' into behaviouralcorrection
Merge branch 'behaviouralcorrection'
Fixing our C programmer tendencies.

At least temporarily