remove redundant worker code and make a more consitent api to call workers, remove unused batch code