fix permalink with multiple timeseries, some refactoring/renamings