Adds the initial part of settings and extensions, removes code out of record