Removed redundancies and made actionlistener actually do something.