Added Edit Margins Window and Toggle Margins Button Functionality