implements document creation && fix blanks && rename fragment builder to template