perf(WTF): extracted scopes to separate file, add documentation