Refactor STEP 5

STEP 5 had parts A (Get bottom phase bounds) and B (Identify phases).
Refactored into two separate steps.