*lock for image hash (thread safety)

*MakeLink function for listview. simplifies code.
*formatting