Make the scm loading a function.