Improve RNG and tidy up AES class