Re-arange code a bit to build in dev-mode without ss7