improved admin script.
Merge branch 'test' into dev