small refactoring of makeDeclaration and fix optimizaSize for included templates
small refactoring of makeDeclaration and fix optimizaSize for included templates

basisjs/basisjs,basisjs/basisjs,fateevv/basisjs,basisjs/basisjs,istrel/basisjs,istrel/basisjs,tyanas/basisjs,tyanas/basisjs,fateevv/basisjs,smelukov/basisjs,smelukov/basisjs,fateevv/basisjs,smelukov/basisjs,tyanas/basisjs,istrel/basisjs