Refactored the code
Merge pull request #3 from kelvinau/encryption

Refactored the code