more clean backend interface, fix bug when change to Production environtment