I think you can remove all the `\displaystyle {}` and just use `\dfrac` instead of `\frac` everywhere unless I'm missing something.