worked on logging and comments, changed secure

added a few comments
modified logging a tad, just to clean it up. Still needs more cleanup.
Changed secure to be less expensive by initializing the crypto
statically.