Add dual mode support for front and back end