refactor dictionary name
Move Lock to outer scope
Move classes to their own files
Move files to correct location