Factor out EAX mode into separate module