Some refactorings

Few refactorings and small changes to master branch. Besides changes to Worker class, other changes are mostly small things. I've explained motivation in each commit message.

What do you think?