Move speed tests into tests

Moved speed tests to (start) de-cluttering main()
Removed unnecessary globals (being global does not affect things being optimised or not optimised)