Added tests with random vectors.
Added GPT speed tests.
Make construction of generator matrix more general.