Fix slack calculation
WIP
Extend calculate slack test