little refactorings, first tests for user system