Clean up MainGui's Code and Refactor new Methods