Implement a much better implementation of phase highlighting with credits to @Mitch528!