Added the possibility of genearting sm, am and registry separately