Should cache <code>vapour.win</code> in a variable (e.g., <code>$window = vapour.win;</code>) since it is used more than once.