Fixed timer bugs, added RNG based on George Marsaglias XORshift RNG