Leader elector prototype
simplifying, added worker implementation.
main code completed. Ready for debugging
Basic functionality works.