Added ability to run code in admin mode