some minor cleanup & move write behind queue item counter to map service.