Cleanup getting path to admin in JS file