tweak basis.ready
fix template relative filename resolving for source viewer
rework basis.Token (use list for attaches instead of array)