Code cleanup, and use the more standard user

instead of uid attribute