Re-factored some code, added key masking, improved randomness