Randomize now works for e.
Changed inverse function and fixed type where n was being used instead of phi in inverse function.