Trial less hacks in the CI process for a while.
Extracted complex logic into more readable methods.