code cleanup: merge different format creation and better var naming
code cleanup: move createPlot function into "class"
code cleanup: tick center calculation "global"