Added further randomness and cleaned class calling procedure