Fixed thread variable errors, implemented speed mod