Refactor AdminDebug & AdminLog

Same as my previous PR:
- methods visibility
- split db queries to Subs.