Refactor model a bit and fix wrong behavior of the plot
Clean up model and timehelper