Adding functions to encryp/decrypt the data. For now, it is pretty simple... only one key for each application.
allocating memory and removing some compiler warnings.