Cleaning up main task loop
Creating worker doc and setting up proper date serialization
Adding worker scanning and running
Fixing test so it is more robust