move most functions out of actionPerformed() method into their own methods.