Added encryption/decryption functions and changed formatting