Small code style fix.
Reorderd function position closer to helper functions.