enable upload of jpeg and png files
ensure document have name even if none is set by user
white space fix
remove style attributes from markup; fixes #40