Changes to support admin control panel (and some comments)