Added RSA algorithm, few refactorings