Use getpwent instead of grepping /etc/passwd, cleaned up whitespace.