Refactoring

Bugfix for addwork + ping refactoring