Extracting XFF functions.

The handler was getting a little to big. Before the user blocking
features get implemented this cleanup was in order.

Signed-off-by: Aaron Bedra <aaron@aaronbedra.com>