reorg some more and add in SCM checkout function hook