Updated server, extracted image operation in a separate file
Addedf fixes for thumb generation