move figText to separate file, fix tests