tidy up
Key log clean up
Add security code to keys