Max deprecated in favour of maximum
Fixed bugs and added asserts to make sure not more bugs arrive

Since we forgot to reset queue size and facilities at each run, the queue sizes just increased exponentially.