Refactor a bit. Make edit window frame buttons look nice.