bugfixes and preliminary integration of .Rmd sol