Refactor work API