Fix 'f*' usage, refactor template string parsing part