added in private key field and some other cleanup stuff