Refactored unit tests and added users support