cleaned up code a bit, will add more RSA unit tests before progressing