Tidied some code, removed coefficient editing for the main frame and added a fit-to-screen function