Multiprocessing working; update_db() is split to init_db and update_db; code is still really messy;