spend data minify refactor part 1