Refactor workers to make them more efficient