Fix equipment flyout and clean up code.