Improve code and add periodic task
Merge branch 'master' into dev_mode
ADD USER mode