core salt: wrap user main function in init function instead of hacking on it