update_fix: reoganize code into modules