Added base code and changed some things to Swing.