AdminController : commented, and some functions moved to proper libraries