Swing refactor