Added settings and code cleanup
Added specific user support in for workers and cleaned up program flow control.
Merge pull request #28 from filinep/rewrite

Added settings and code cleanup