user management and some refactoring
conflict resolving