fix bug in parseTemplate, improve _map and jsdoc for importStyles