Added closeIcon which works on a mouselistener broke more of the
mainFrame object down in order for even more abstraction.