Encryption working, cleaned up