Runtime refactor merge into master

@mdobson This good to merge? I want to give the link to Anant with the sample directory filled out.