fied whitespaces, slightly refactored setting of id, fixed write concern bug