Added default gids, uids. Formatting and refactoring