Rearranged scm.c and libscm.h for better flow.