DEV: update packages, refactor helper fucntions, indent