Added support for renderSync and added more tests