bulk refactor - almost done