Move sp and util to src/lib