Added check for admin rights.
Removed unused helpers.