refactor: types and templates
major refactor in separated files
refactor: extracting pad from String.prototype