Updates variables and profile template