Moved user table to database; first code inspection