UPDATED code and Maintenance panel

various code simplifications