Cleaned up everything from the memory leak hunting spree, fixed another memory leak, added in some validation on the sheet buttons at the bottom so that they don't cause error with no file loaded etc.