Refactor workers into class, rename foundry.py -> worker.py