Changed from using JPanel to using Canvas (for double buffering). Also made the use of pens more efficient.