Improvements to the code and made it so the left and right panels move out of the way