Update worker.class.php

Cleaned up code