Add integrity and encryption routines. Small fixes.