Fixed special case where the peakLimit was scheduled to after the ramping is completed and therefore would always be 1, fixed two minor code-beautification issues aswell