fixed bug with before save, added tree menu for backend and widget for main page