Pass backend object to setupMap instead of accessing backend from global object
Replace global backend object with local variable