Address review comments: import order and type; log messages
Remove undeeded find_or_create, rewrite key saving code to actually work.