Fixing bugs with admin page

Still not working entirely (e.g., create legend not working)