Removed BouncyCastle references and added dispose methods to repo