Change encryption/decryption implementation, remove unused stuffs, added decryption padding removal