Flesh out the unit tests and redo the encryption