code structure improvements
fixed user sync