Refactored: move imports
Fixed: publish all data points instead of publishing a single (the last) data point