Moving Scm library out of core