Split RPL into core and mode related functions.