mainToolbar: clean compilation warnings

Remove unused variables
mainView : fix compilation warnings

Remove unused overlay and cast widget