Condensed code for replacing ' ' with . in bundle ids